package com.itheima.queryParams;

import lombok.Data;

@Data
public class UserQueryParam {
    private String name;
    private Integer gender;
    private Integer page = 1;
    private Integer pageSize = 10;

    private Integer index;

    //这个方法是来通过反射的原理，来获取分页的索引。
    public Integer getIndex(){
        return (page-1)*pageSize;
    }
}
